<!doctype html>
<%@ page contentType="text/html;charset=utf-8" pageEncoding="utf-8"
	language="java"%>
<%@ include file="/jsp/mobile/include/include.jsp"%>
<html lang="cn">
<head>
<%@ include file="/jsp/mobile/include/header.jsp"%>
<title>交易/客户</title>
</head>
<body class="nobg">
	<div class="main">
		<div class="tBm">
			<ul class="clearfix">
				<li><a href="#" class="cur">交易收益</a>
				</li>
				<li><a href="<%=request.getContextPath()%>/mobile/sprofit/customer">我的客户</a>
				</li>
			</ul>
		</div>
		<div class="sltTj" id="default">
			<div class="selTi" id="defaultQuery">
				按条件查询<i class="ico ico7"></i>
			</div>
		</div>
		<div class="sltTj" id="collspan" style="display: none">
			<div class="selCi">
				<div class="gTb clearfix" id="collspanQuery">
					<span class="tit">按条件查询</span> <span class="fr">收回<i
						class="ico ico8"></i> </span>
				</div>
				<form id="queryForm"
					action="<%=request.getContextPath()%>/mobile/sprofit/querySpTrade">
					<div class="gTb">
						<span class="tit">开始日期：</span> <input type="text" class="text"
							name="beginDate"
							value="<c:out value='${domain.beginDate}'/>">
					</div>
					<div class="gTb">
						<span class="tit">结束日期：</span> <input type="text" class="text"
							name="endDate" value="<c:out value='${domain.endDate}'/>">
					</div>
					<div class="sBtn">
						<a href="javascript:query();"><i class="ico ico9"></i>查询</a>
					</div>
				</form>
			</div>
		</div>

		<fmt:parseDate value="${domain.beginDate}" var="beginVar"
			pattern="yyyy-MM-dd" />
		<fmt:parseDate value="${domain.endDate}" var="endVar"
			pattern="yyyy-MM-dd" />
		<div class="seCon clearfix">
			<span class="fl"><fmt:formatDate value="${beginVar}"
					pattern="yyyy/MM/dd" />-<fmt:formatDate value="${endVar}"
					pattern="MM/dd" /></span> <span class="fr red">期间累计收益：￥<fmt:formatNumber
					pattern="#,##0.00" value="${totalAmt}" /> </span>
		</div>
		<div class="selJg">
			<c:forEach var="model" items="${list}">
			<div class="time">
					<c:out value="${model.spDate}" />
				</div>
				<ul>
					<c:forEach var="spModel" items="${model.spList}">
						<li>
							<p>
								用户手机：<common:getStringByReplace key="${spModel.merSysAccount}" startPos="3" endPos="6" />
								<i class="red"><c:if test="${spModel.spDetailType == '0'}">(普通分润)</c:if> </i>
								<i class="red"><c:if test="${spModel.spDetailType == '2'}">(二级)</c:if> </i>
								<i class="red"><c:if test="${spModel.spDetailType == '3'}">(三级)</c:if> </i>
								<i class="red"><c:if test="${spModel.spDetailType == '1'}">(直属)</c:if> </i>
							</p>
							<p>
								用户姓名： <common:getStringByReplace key="${spModel.merchantName}" startPos="1"/>
							</p>
							<p>
								收益贡献：
								<i class="red">￥<fmt:formatNumber pattern="#,##0.00" value="${spModel.spDetailAmt}" /></i>
							</p>
						</li>
						</c:forEach>
				</ul>
			</c:forEach>
			<div class="moreJy">点击查看更多交易</div>
		</div>
	</div>

	<script type="text/javascript">
		function query() {
			$("#queryForm").submit();
		}

		$("#defaultQuery").bind("click", function() {
			$("#default").hide();
			$("#collspan").show();
		});

		$("#collspanQuery").bind("click", function() {
			$("#default").show();
			$("#collspan").hide();
		});
	</script>

</body>
</html>